//
//  DKAuthCertificationCamorView.m
//  DanKU
//
//  Created by 吴斌 on 2023/10/29.
//

#import "DKAuthCertificationCamorView.h"

@implementation DKAuthCertificationCamorView
-(instancetype)init{
    if(self == [super init]){
        self.backgroundColor = DK_Hex(@"#FFFFFF");
        self.layer.cornerRadius = DK_IsWidthScale(25);
        self.clipsToBounds = YES;
        [self dk_addSubView];
    }
    return self;
}
- (void)dk_addSubView{
    UIImageView * dk_AuthCertificationImgView = [[UIImageView alloc] init];
    dk_AuthCertificationImgView.image = DK_GetImage(@"dk_AuthCamera");
    dk_AuthCertificationImgView.userInteractionEnabled = YES;
    [self addSubview:dk_AuthCertificationImgView];
    [dk_AuthCertificationImgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self);
        make.centerX.equalTo(self);
        make.width.equalTo(@(DK_IsWidthScale(30)));
        make.height.equalTo(@(DK_IsWidthScale(30)));
    }];
    UIButton * dk_AuthFaceCertificationBtn = [[UIButton alloc] init];
    [dk_AuthFaceCertificationBtn addTarget:self action:@selector(authFaceCertification) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:dk_AuthFaceCertificationBtn];
    [dk_AuthFaceCertificationBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(@(DK_IsWidthScale(0)));
    }];
}
- (void)authFaceCertification{
    if(self.CertificationCamorBlock){
        self.CertificationCamorBlock();
    }
}
@end
